<extend name="Public/base" />
<block name="content">
<div id="content">
    <div id="content-header">
        <div id="breadcrumb">
            <a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i
                class="icon-home"></i> 首页</a> <a href="#" class="current">{$meta_title}</a>
        </div>
    </div>
    <div class="container-fluid">
        <br/>
        <button class="btn btn-info ajax-post" id="add" url="{:U('addSms')}">新 增</button>
     <!--    <button class="btn btn-success ajax-post " url="{:U('setSmsStatus?model=serviceSmsTemplate&status=1')}" target-form="ids">启 用</button>
        <button class="btn btn-warning ajax-post" url="{:U('setSmsStatus?model=serviceSmsTemplate&status=0')}" target-form="ids">禁 用</button> -->
        <button class="confirm btn btn-danger ajax-post" url="{:U('setSmsStatus?model=serviceSmsTemplate&status=-1')}" target-form="ids">删 除</button>
        <div class="search-form fr cf">
            <input type="text" name="sms_template_name" class="search-input" value="{:strip_tags(I('sms_template_name'))}" placeholder="请输入短信模板名称" style="margin-bottom:0;"><button class="btn btn-info" id="search_button" url="{:U('Base/sms')}"><i class="icon-search icon-white"></i></button>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box">
                    <div class="widget-content ">
                        <table class="table table-bordered table-striped with-check">
                            <thead>
                                <tr>
                                    <th><input type="checkbox" /></th>
                                    <th>序号</th>
                                    <th>名称</th>
                                    <th>内容</th>
                                    <th>创建时间</th>
                                    <th>更新时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <notempty name="list">
                                <volist name="list" id="vo">
                                    <tr>
                                        <td class="taskStatus"><input type="checkbox" value="{$vo.sms_template_id}" name="ids[]" class="ids"/></td>
                                        <td class="taskStatus">&nbsp;&nbsp;&nbsp;&nbsp;{$i}&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                        <td class="taskStatus">{$vo.sms_template_name|htmlspecialchars}</td>
                                        <td class="taskStatus">{$vo.sms_template_content|htmlspecialchars}</td>
                                        <td class="taskStatus">{$vo.create_time|time_format}</td>
                                        <td class="taskStatus">{$vo.update_time|time_format}</td>
                                        <td class="taskStatus">
                                            <a href="{:U('editSms?sms_template_id='.$vo['sms_template_id'])}"><i class="icon-edit"></i> 编辑</a>
                                            <!-- <a href="{:U('setSmsStatus?model=serviceSmsTemplate&ids='.$vo['sms_template_id'].'&status='.abs(1-$vo['status']))}" class="ajax-get">
                                                <switch name="vo.status">
                                                    <case value="0"> <i class="icon-unlock"></i> 启用</case>
                                                    <case value="1"> <i class="icon-lock"></i> 禁用</case>
                                                    <default/> default
                                                </switch>
                                            </a> -->
                                            <a href="{:U('setSmsStatus?model=serviceSmsTemplate&ids='.$vo['sms_template_id'].'&status=-1')}" class="confirm ajax-get"><i class="icon-remove"></i> 删除</a>
                                        </td>
                                    </tr>
                                </volist>
                            <else/>
                                <tr>
                                    <td colspan="11" class="taskStatus"> Oh~亲爱滴,暂时还没有内容! </td>
                                </tr>
                            </notempty>
                            </tbody>
                        </table>
                        <div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
                            {$_page}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
$(function (){
    //新增跳转页面
    $('#add').click(function(){
        window.location.href="{:U('Base/addSms')}";
    });
});
//导航高亮
highlight_subnav("{:U('Base/sms')}");
</script>
</block>